package net.oschina.allchat.server.framework.pipe.parsing;

import net.oschina.allchat.message.processing.parsers.im.MessageParserFactory;
import net.oschina.allchat.message.processing.parsers.im.PresenceParserFactory;
import net.oschina.allchat.protocol.core.ProtocolChain;
import net.oschina.allchat.protocol.im.stanza.Message;
import net.oschina.allchat.protocol.im.stanza.Presence;
import net.oschina.allchat.server.framework.core.annotations.Component;

@Component("default.message.parsing.processor")
public class DefaultMessageParsingProcessor extends MinimumMessageParsingProcessor {
	
	@Override
	protected void registerPredefinedParsers() {
		super.registerPredefinedParsers();
		
		parsingFactory.register(ProtocolChain.first(Presence.PROTOCOL), new PresenceParserFactory());
		parsingFactory.register(ProtocolChain.first(Message.PROTOCOL), new MessageParserFactory());
	}
	
}
